package com.toy.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @author 刘昱江
 * 时间 2021/2/18
 */
@TableName("rights")
@Data
@Accessors(chain = true)
public class Rights{
    private Integer id;
    private String name;
    private Integer parentId;
    private String path;
    private Integer level;
    @TableField(exist = false)
    private List<Rights> children; //不是表格固有属性
    @TableField(fill = FieldFill.INSERT)
    private Date created;	//表示入库时需要赋值
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updated;	//表示入库/更新时赋值.

}
